package cc.ichoice2.web.buss.system.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

import cc.ichoice2.web.buss.demo.service.DemoService;

/**
 * 
 * @author twg
 *
 */
@Controller
@RequestMapping("/loginController")
public class LoginController {
	@Autowired
	private DemoService demoService;
	
	@RequestMapping(params = "index")
	public ModelAndView index(){
		System.out.println("LoginController.index()");
		demoService.save();
		return new ModelAndView("index");
	}
	@RequestMapping(params = "save",method = RequestMethod.POST)
	public ModelAndView save(){
		System.out.println("LoginController.save()");
		demoService.save();
		return new ModelAndView("index0");
	}
	
}
